<include file="./top" />
<!-- start: Header -->
<include file="./head" />
<!-- end: Header -->

<div class="container-fluid content">
  <div class="row"> 
    <!-- start: Main Menu --> 
    <include file="./slide" /> 
    <!-- end: Main Menu --> 
    
    <!-- start: Content -->
    <div class="main sidebar-minified"> 
      <!--div class="row">
      <div class="col-lg-12">
        <h3 class="page-header"><i class="fa fa-table"></i>{$title}</h3>
      </div>
    </div-->
      <div class="row">
        <div class="col-lg-12">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h2><i class="fa fa-table red"></i><span class="break"></span><strong>{$title}</strong></h2>
              <div class="panel-actions"> <a href="table.html#" class="btn-setting"><i class="fa fa-rotate-right"></i></a> <a href="table.html#" class="btn-minimize"><i class="fa fa-chevron-up"></i></a> </div>
            </div>
            <div class="panel-body" >
            <div class="btn-group" >
            <div class="form-inline">
              <form action="" method="get" style=" float:left;margin-right:10px;" >
                <div class="form-group">
                  <select class="btn"  name="select" id="select">
                    <option value="0">请选择查询类型</option>
                    <option value ="id" <?php if(I('get.select')=='uid'){ ?>selected <?php }?>>会员ID</option>
                    <option value ="nickname" <?php if(I('get.select')=='uid'){ ?>selected <?php }?>>微信昵称</option>
                    <!--option value ="login_ip" <?php if(I('get.select')=='uid'){ ?>selected <?php }?>>登陆IP</option-->
                   </select>
                </div>
                <div class="form-group">
                  <input name="nr" id="nr" type="text" class="form-control" value="{:I('get.nr')}" />
                </div>
                <div class="form-group">
                  <select class="btn"  name="order" id="select">
                    <option value="0">排序方式</option>
                    <option value ="balance" <?php if(I('get.order')=='balance'){ ?>selected <?php }?>>余额最多</option>
                    <option value ="paid" <?php if(I('get.order')=='paid'){ ?>selected <?php }?>>已支付最多</option>
                    <option value ="dongjie" <?php if(I('get.order')=='dongjie'){ ?>selected <?php }?>>冻结最多</option>
                    <option value ="xiaji" <?php if(I('get.order')=='xiaji'){ ?>selected <?php }?>>粉丝收益最多</option>
                    <option value ="kouliang_bili" <?php if(I('get.order')=='kouliang_bili'){ ?>selected <?php }?>>扣量比例最多</option>      
                  </select>
                </div>
                <div class="form-group">
                <button type="submit" class="btn btn-primary btn-success" id="but"><i class="fa fa-dot-circle-o"></i> 查询 </button>
              </form>
            </div>
            <form action="{:U('User/qingli')}" method="get" style=" float:left" >
              <div class="form-group">
                <button type="button" class="btn btn-primary btn-danger"  id="del"><i class="fa fa-ban"></i>清理会员</button>
                <div class="form-group"> 账号余额少于:
                  <input name="balance"  type="text" class="form-control" value="1"  style=" width:60px;" />
                  元
                  
                  并且多少天:
                  <input name="login_time"  type="text" class="form-control" value="30"  style=" width:60px;" />
                </div>
                未登陆
                <button type="submit" class="btn btn-primary btn-success" id="but"><i class="fa fa-dot-circle-o"></i> 清理 </button>
              </div>
              </div>
              </div>
            </form>
    
          <table class="table table-striped table-bordered bootstrap-datatable datatable">
            <thead>
              <tr>
                <th width="4%">ID</th>
                <th width="15%">手机号/微信号</th>
                <th width="20%">余额 | 已支付 | 冻结 | 粉丝收益</th>
                <th width="35%">注册时间 | 注册IP | 上次登陆时间 | 上次登陆IP</th>
                <th>点击金额 | 扣量比例 | 扣量时间</th>
                <th width="10%">操作</th>
              </tr>
            </thead>
            <tbody>
              <?php foreach($user as $v): ?>
              <tr>
                <td>{$v['id']}</td>
                <td><?php if($v['user_tel']){echo $v['user_tel'];}else{ echo "未绑定";}?>
                  |
                  <?php if($v['nickname']){echo $v['nickname'];}else{ echo "未绑定";}?></td>
                <td>{:get_erwei($v['balance'])} | {:get_erwei($v['paid'])} | {:get_erwei($v['dongjie'])} | {:get_erwei($v['xiaji'])}</td>


                <td>{:date("y-m-d H:i",$v['reg_time'])} | {:long2ip($v['reg_ip'])} | {:date("y-m-d H:i",$v['login_time'])} | {:long2ip($v['login_ip'])} |
                
{:get_cs(long2ip($v['login_ip']))}
                </td>


                <td> <?php if(!$v['price']){ echo "全局";}else{ echo $v['price'];}?> | 
                
                  <?php if(!$v['kouliang_bili']){ echo "全局";}else{ echo $v['kouliang_bili'];}?>
                  |
                  <?php if(!$v['kouliang_time']){ echo "全局";}else{ echo $v['kouliang_time'];}?></td>
                <td><a class="btn btn-info" href="{:U("User/update/",array('id'=>$v['id']))}"> <i class="fa fa-edit "></i> </a> <a class="btn btn-danger" href="{:U("user/del/",array('id'=>$v['id']))}" onclick="javascript:return p_del()"   > <i class="fa fa-trash-o "></i></a></td>
              </tr>
              <?php endforeach;?>
            </tbody>
          </table>
        </div>
        
                       <div class="panel-body">
      <ul class="pagination">
        {$page}
      </ul>
         </div>
         
         
      </div>
    </div>
    <!--/col--> 
    
  </div>
</div>
</div>
<include file="./foot" />
</body></html>